<?php
/*
 *  Rock Band Stats(C) 2008  Tea Figuric
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Tea Figuric
 *  tea@figuric.net
 *  http://www.figuric.net/luc/facebook/rockband/xml/
 */

require_once 'appinclude.php';


if (isset($_REQUEST['name'])) {
  $facebook->api_client->profile_setFBML($_REQUEST['name'], $user);
  $facebook->redirect($facebook->get_facebook_url() . '/profile.php');
}

echo '<link rel="stylesheet" href="rockbandstyle.css" type="text/css" media="all"/>
<div style="padding:20px;">
<div class="nav"><span class="nav"><a href="profile.php?name=' . $name .'">My Stats  </a> | <a href="index.php">New Band  </a>|<a href="index.php"> Some other link </a></span><br />
  <br />

<div style="border-top: 1px solid #d8dfea; border-bottom: 1px solid #d8dfea; padding: 10px 20px; background: #f7f7f7 none repeat scroll 0% 0%; border-left: 1px solid #d8dfea; border-right: 1px solid #d8dfea; width: auto;">
  <h3>Rock Band Stats </h3>
</div>
</div>
<br />';

echo "<fb:name uid=" . $user . " useyou='false' possessive='false' firstnameonly='true'/>, welcome to the Rock Band Stats!<br /><br />
This application was developed as a project for my Markup Languages class, taught by Dr. Thiruvathukal<br /> at Loyola University Chicago. <br />
The application is still in its alpha phase.<br />
<br/>
To retrieve your band statisctics, you need to create an account with <a href='http://www.rockband.com/rockers_home'>The official Rock Band Community</a> and link your game data to the account as descibed on the page.<br />
Once you registered and linked your game, enter the band name below and submit to retrieve the stats. <br /><br />";

echo "<br> So, <fb:name uid=" . $user . " useyou='false' firstnameonly='true'/> are you ready to show to the world what a first class rocker you are?<br /><br />";
//echo "<pre>Debug:" . print_r($facebook,true) . "</pre>";

echo '<form id="form1" name="form1" method="post" action="eval2.php">';
echo '  <input name="name" type="text" id="name" />';
echo '  <input type="submit" name="Submit" value="I\'m ready!" />';
echo '</form><br></div></div>';
?>